import { http } from '@/utils/http.ts'
import type { PageParams } from '@/types/global'
import type { HotResult } from '@/types/hot'

type HotParams = PageParams & { subType?: string }

/**
 * 热门推荐
 * @param url 接口地址
 * @param data 查询参数
 */
export const getHotRecommendationsAPI = (url: string, data?: HotParams) => {
    return http<HotResult>({
        method: 'GET',
        url,
        data,
    })
}
